//
//  HWRegisterViewController.m
//  嗨文
//
//  Created by 响当当 on 2019/3/19.
//  Copyright © 2019年 dongzheng. All rights reserved.
//

#import "HWRegisterViewController.h"
#import "HWRegisterView.h"

@interface HWRegisterViewController ()
@property (nonatomic, strong)HWRegisterView *registerView;
@end

@implementation HWRegisterViewController

- (HWRegisterView *)registerView
{
    if (!_registerView)
    {
        _registerView = [[HWRegisterView alloc]initWithFrame:CGRectMake(0,NAVIBAR_HEIGHT,SCREEN_WIDTH,SCREEN_HEIGHT-NAVIBAR_HEIGHT)];
    }
    return _registerView;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self buryPoint];
    [self setDefaultNavWithTitle:@"注册账号"];
    
    [self.view addSubview:self.registerView];
}

- (void)backAction
{
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

- (void)buryPoint
{
    NSString *lastStayTime = [kUserDefaults objectForKey:@"time"];
    NSString *nowStayTime = [NSString stringWithFormat:@"%ld",[[HWUtilties getNowTimeTimestamp3] integerValue] - lastStayTime.integerValue];
    
    [HWUtilties buryPointWithStayTime:nowStayTime
                            timestamp:[HWUtilties getNowTimeTimestamp3]
                             memberId:current_User.userID
                              fromUrl:nil
                                toUrl:@"/register"
                               fromId:nil
                                 toId:@"25678c5b1288aa70"];
}
@end
